
#include<string.h>
#include<stdbool.h>

bool arrayStringsAreEqual(char **word1, int word1Size, char **word2, int word2Size)
{
    if (word1 == NULL || word2 == NULL)
    {
        return false;
    }
    char ans1[1000];
    char ans2[1000];
    int i, j;
    strcpy(ans1, word1[0]);
    strcpy(ans2, word2[0]);
    for (i = 1; i < word1Size; i++)
    {
        strcat(ans1, word1[i]);
    }
    for (j = 1; j < word2Size; j++)
    {
        strcat(ans2, word2[j]);
    }
    if (strcmp(ans1, ans2) == 0)
    {
        return true;
    }
    else
    {
        return false;
    }
}